Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parentheses around thread id to prevent diff flamegraph #234

Merged
merged 1 commit into from
Apr 26, 2020

Conversation

NuriAmari
Copy link

@NuriAmari NuriAmari commented Apr 2, 2020

The use of the --thread option can result in stack samples that look like thread <thread_id> <count>. Inferno and Brendan Gregg's perl script will treat this as a function with name thread and two counts. This results in the creation of a differential flamegraph when not
desired. Changing the frame name to thread (<thread_id>) fixes this
issue. Note this is only an issue when there are no stack frames on top of the thread root (ie. thread <thread_id>; A (file.py:123) <count> is no problem). Below I've attached a zip with 4 profiles, 2 before the change and 2 after to demonstrate the issue.

example_files.zip

The use of the --thread option can result in stack samples that look
like "thread <thread_id> <count>". Inferno and Brendan Gregg's perl
script will treat this as a frame function of with name "thread" and two
counts. This results in the creation of differential flamegraph when not
desired. Changing the frame name to "thread (<thread_id>)" fixes this
issue.
@benfred benfred merged commit c98a658 into benfred:master Apr 26, 2020
@benfred
Copy link
Owner

benfred commented Apr 26, 2020

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants